package com.codegenerate.demo.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.codegenerate.demo.entity.SysClass;
import com.codegenerate.demo.mapper.SysClassMapper;
import com.codegenerate.demo.mapper.querys.SysClassQuery;
import com.codegenerate.demo.service.SysClassService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

@Service
public class SysClassServiceImpl extends ServiceImpl<SysClassMapper, SysClass>
        implements SysClassService {


    @Override
    public boolean exitHashNext(long id) {
        var query = new QueryWrapper<SysClass>();
        query.eq("parent_id", id);
        var count=this.getBaseMapper().selectCount(query);
        return count>0;
    }


}